package SimpleFactoryMode.pizzastore.pizza;

import com.sun.javafx.sg.prism.web.NGWebView;

import javax.naming.Name;

/**
 * @program: DesignModeProject
 * @description:
 * @author: Li canzhang
 * @create: 2022-04-22 22:40
 **/
public class PizzaStore {
    private PizzaFactory pizzaFactory;

    public PizzaStore(PizzaFactory pizzaFactory) {
        this.pizzaFactory = pizzaFactory;
    }

    public Pizza OrderPizza(String pizzaName){
        Pizza pizza = pizzaFactory.getPizza(pizzaName);
        return pizza;
    }

    public static void main(String[] args) {
        PizzaStore pizzaStore = new PizzaStore(new PizzaFactory());
        System.out.println(pizzaStore.OrderPizza("cheese").toString());
    }
}


